package br.com.ximp.addessi.client.ui;


import br.com.ximp.addessi.shared.entity.Conta;

import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.SpanElement;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Widget;

public class ContaUI extends Composite{
	interface MyUiBinder extends UiBinder<Widget, ContaUI> {}
	private static MyUiBinder uiBinder = GWT.create(MyUiBinder.class);
	
	@UiField SpanElement lblNome;
	@UiField SpanElement lblTipo;
	
	public ContaUI() {
		initWidget(uiBinder.createAndBindUi(this));		
	}
	
	public void setConta(Conta conta){
		lblNome.setInnerText (conta.getNome());
		lblTipo.setInnerText (conta.getTipoConta().getDescricao()); 
	}
}